﻿package com.firewolf.proxy.mains;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import com.firewolf.proxy.impls.MyRemoteImpl;
import com.firewolf.proxy.interfaces.MyRemoteService;

public class CilentMain {
	public static void main(String[] args) {
		go();
	}
	public static void go(){
		try {
			MyRemoteService remoteService = (MyRemoteService) Naming.lookup("rmi://127.0.0.1/RemoteHello");
			String string = remoteService.sayHello();
			System.out.println(string);
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (NotBoundException e) {
			e.printStackTrace();
		}
	}
}
